import request from '@/utils/request'

// 查询车间任务列表
export function listWorktask(query) {
  return request({
    url: '/mes/worktask/list',
    method: 'get',
    params: query
  })
}

// 查询车间任务详细
export function getWorktask(id) {
  return request({
    url: '/mes/worktask/' + id,
    method: 'get'
  })
}

// 新增车间任务
export function addWorktask(data) {
  return request({
    url: '/mes/worktask',
    method: 'post',
    data: data
  })
}

// 修改车间任务
export function updateWorktask(data) {
  return request({
    url: '/mes/worktask',
    method: 'put',
    data: data
  })
}

// 删除车间任务
export function delWorktask(id) {
  return request({
    url: '/mes/worktask/' + id,
    method: 'delete'
  })
}
